home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / term / kyo.trm < prev    next >
Text File  |  1993-09-15  |  2KB  |  113 lines

  1. /*
  2.  * $Id: kyo.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  3.  *
  4.  */
  5.  
  6. /* Prescribe (KYOCERA) driver - Michael Waldor */
  7. /* Modified for gnuplot 2.0 sk@sun4 24-Apr-1990 13:23 */
  8. #ifdef PRESCRIBE
  9.  
  10. #define PRE_XMAX 2567
  11. #define PRE_YMAX 1815    /* X:Y = sqrt(2) */
  12.  
  13. #define PRE_XLAST (PRE_XMAX - 1)
  14. #define PRE_YLAST (PRE_YMAX - 1)
  15.  
  16. #define PRE_VCHAR (PRE_YMAX/30)
  17. #define PRE_HCHAR 33    /* about 9 chars per inch */
  18. #define PRE_HTIC (PRE_XMAX/80)
  19. #define PRE_VTIC PRE_HTIC
  20.  
  21. /* for Courier font: */
  22. #define KYO_VCHAR (14*(300/72))    /* 12 pt + 2 pt baselineskip */
  23. #define KYO_HCHAR (300/10)    /*  10 chars per inch */
  24.  
  25. enum JUSTIFY pre_justify=LEFT;    /* text is flush left */
  26.  
  27. PRE_init()
  28. {
  29.   (void) fprintf(outfile,"!R! RES;\n") ;
  30.   /* UNIT: units are dots, 300 dots = 1 in = 72 pt */
  31.   /* SPO: landscape format */
  32.   /* STM, SLM set top, left margin*/
  33.   /* Font: bold Helvetica (proportional font) */
  34.   (void) fprintf(outfile,"PAGE; UNIT D; SPO L; STM 280; SLM 440;\n") ;
  35.   (void) fprintf(outfile,"FTMD 15; FONT 29; SCPI 9;\n") ;
  36. }
  37.  
  38. KYO_init()
  39. {
  40.   (void) fprintf(outfile,"!R! RES;\n") ;
  41.   /* UNIT: units are dots, 300 dots = 1 in = 72 pt */
  42.   /* SPO: landscape format */
  43.   /* STM, SLM set top, left margin */
  44.   /* Font: Courier (fixed width font) */
  45.   (void) fprintf(outfile,"PAGE; UNIT D; SPO L; STM 280; SLM 440;\n") ;
  46.   (void) fprintf(outfile,"FTMD 15; FONT 17; SCPI 10;\n") ;
  47. }
  48.  
  49. PRE_graphics()
  50. {
  51. }
  52.  
  53. PRE_text()            /* eject page after each plot */
  54. {
  55.   (void) fprintf(outfile,"PAGE;\n") ; 
  56. }
  57.  
  58. PRE_linetype(linetype)
  59. int linetype ;
  60. {
  61.   /* actually choose pendiameter */
  62.   if (linetype < 0) linetype = -linetype;
  63.   else linetype = 3;
  64.   (void) fprintf(outfile,"SPD %d;\n", linetype) ;
  65. }
  66.  
  67. PRE_move(x,y)
  68. unsigned int x,y ;
  69. {
  70.   (void) fprintf(outfile,"MAP %1d,%1d;\n",x,PRE_YMAX-y) ;
  71. }
  72.  
  73. PRE_vector(x,y)
  74. unsigned int x,y ;
  75. {
  76.   (void) fprintf(outfile,"DAP %1d, %1d;\n",x,PRE_YMAX-y) ;
  77. }
  78.  
  79. PRE_put_text(x, y, str)
  80. unsigned int x,y ;
  81. char *str;
  82. {
  83.   PRE_move(x,y);
  84.   switch(pre_justify){
  85.   case RIGHT:
  86.     (void) fprintf(outfile,"RTXT \"%s\", B;\n",str) ;
  87.     break;
  88.   default:
  89.     (void) fprintf(outfile,"TEXT \"%s\", B;\n",str) ;
  90.   }
  91. }
  92.  
  93. int PRE_justify_text(mode)
  94. enum JUSTIFY mode;
  95. {
  96.   pre_justify=mode;
  97.   switch(pre_justify){
  98.   case LEFT:
  99.   case RIGHT:
  100.     return(TRUE);
  101.   default:
  102.     return(FALSE);
  103.   }
  104.   
  105. }
  106.  
  107. PRE_reset()
  108. {
  109.   (void) fprintf(outfile,"PAGE; RES; EXIT;\n");
  110. }
  111.  
  112. #endif /* PRESCRIBE */
  113.